package business.sale.interfaces;

import java.util.ArrayList;

import article.entities.ArticleVO;
import article.exceptions.OutOfStockIngredientsException;
import sale.entities.FacturaVO;
import sale.entities.OrderVO;
import sale.entities.SaleVO;
import sale.exceptions.EmptyOrderException;
import sale.exceptions.NoSalesException;

public interface SaleMgt {

	SaleVO[] getOpenSales() throws NoSalesException; //

	SaleVO[] getOpenTakeoOutSales() throws NoSalesException;//

	SaleVO[] getOpenDeliverySales() throws NoSalesException;//

	SaleVO newSale(OrderVO ord, int tableKey, int ci)
			throws EmptyOrderException, OutOfStockIngredientsException;//

	SaleVO getSale(int tableKey); //

	void addOrder(OrderVO ord, int tableKey) throws OutOfStockIngredientsException;//

	FacturaVO close(SaleVO sale);

	void commit(FacturaVO fact);

	void deleteArticles(SaleVO sale, ArrayList<ArticleVO> arts);

	boolean hasOpenSale(int tableKey);//

	int[] getOpenTables();//

	OrderVO[] getOpenOrders();

}
